[% setvar title The Perl 6 Summary for the week ending 20030622 %]
<div id="archive-notice">
    <h3>This file is part of the Perl 6 Archive</h3>
    <p>To see what is currently happening visit <a href="http://www.perl6.org/">http://www.perl6.org/</a></p>
</div>
<div class='pod'>
<a name='The Perl 6 Summary for the week ending 20030622'></a><h1>The Perl 6 Summary for the week ending 20030622</h1>
<p>Welcome to my first anniversary issue of the Perl 6 Summary. Hopefully
there won't too many more anniversaries to celebrate before we have a
real, running Perl 6, but there's bound to be ongoing development
after that. My job is secure!</p>
<p>Because I can't think of anything better to do, I'll start with the
action on the perl6-internals list</p>
<a name='Converting parrot to continuation passing style'></a><h2>Converting parrot to continuation passing style</h2>
<p>The ongoing effort to convert Parrot to use/support continuation passing style
(CPS) at the assembler level continues. Jonathan Sillito offered
another patch implementing the require support, which Dan liked and
applied.</p>
<p>Klaas-Jan Stol wondered what he'd missed; last time he looked Parrot
wasn't doing continuation passing. He asked why Dan had chosen to go
down that route. Dan answered that he had realized that &quot;we had to save
off so much state that we essentially had a continuation
anyway&quot;. Explicitly going with continuation passing just made things
more formal, and wrapped up all the context saving behind a
straightforward interface. He promised a more detailed explanation
later.</p>
<p><a href='http://groups.google.com/groups?threadm=rt-22717-59457.19.8411354420655@rt.perl.org' target='_blank'>groups.google.com</a></p>
<a name='Portable way of finding libc, unbuffered reads'></a><h2>Portable way of finding libc, unbuffered reads</h2>
<p>Clinton Pierce noted that the following code:</p>
<pre>    loadlib P1, &quot;/lib/libc.so.6&quot;
    dlfunc P0, P1, &quot;system&quot;, &quot;it&quot;
    set I0, 1
    set S5, &quot;ls&quot;
    invoke
    end</pre>
<p>just works, which simultaneously pleases and scares him silly. He
wondered if there was a good way of finding the standard C library on
a Unix system without scary hardwiring as in the fragment above. He
also wondered if there was an 'official' way of getting an unbuffered
read via parrot.</p>
<p>Jens Rieks came up with a gloriously evil way of finding libc. The
theory goes that Parrot is linked against libc, so you just have to
<code>dlopen</code> the running image and you can call libc functions to your
heart's content. To dlopen the running image you need to pass a NULL
pointer to the underlying <code>loadlib</code> so he offered a patch to
<b><i>core.ops</i></b> which interpreted an empty string as a pointer to
NULL. Leo and Dan were impressed and the patch (or something similar)
was applied. I get the feeling that Dan wants to do something a little
less hacky to access the current executable though...</p>
<p>Clint noted that the dlopen the running image by passing a null
pointer trick doesn't work with Windows, but outlined a workaround for
that too. Jen Rieks suggested a better Windows workaround.</p>
<p>Nobody came up with an approved way of doing <code>getc</code>, but once you
have libc loaded you can just use its <code>getc</code>.</p>
<p><a href='http://groups.google.com/groups?threadm=5.1.0.14.2.20030616163614.01f8db18@mail.geeksalad.org' target='_blank'>groups.google.com</a></p>
<a name='OO, Objects'></a><h2>OO, Objects</h2>
<p>If you look in a fresh from CVS parrot directory you'll now find
<b><i>object.ops</i></b>, which will be the cause of much rejoicing in many
places. Dan's nailed the object spec down enough that he's started
implementing a few of the required ops. As he points out, what we have
is &quot;hardly sufficient&quot;, but everyone's got to start somewhere, the
journey of a thousand miles begins with but a single step, etc.</p>
<p>Judging by the number of comments (none), everyone was stunned into
silence.</p>
<p><a href='http://groups.google.com/groups?threadm=a05210600bb16013a7965@' target='_blank'>groups.google.com</a>[63.120.19.221]</p>
<a name='More CPS shenanigans'></a><h2>More CPS shenanigans</h2>
<p>I get the strong feeling that Leo T&ouml;tsch isn't entirely happy
with the new Continuation Passing Style regime. He's worried that the
P6C tests break, and that CPS subs are some 3 times slower for calling
the sub. This led into a discussion of what context really must go
into a continuation, whether we can get away with different classes of
continuation (hold more or less contextual information) and other ways
of possibly speeding things up.</p>
<p>I'm not sure Leo has been entirely convinced, but I'm confident that
Dan's not going to change his mind about this.</p>
<p>Leo later submitted a large patch which unifies the various subroutine
related PMCs to take into account CPS.</p>
<p><a href='http://groups.google.com/groups?threadm=3EF08047.8070803@nextra.at' target='_blank'>groups.google.com</a></p>
<a name='Exceptions'></a><h2>Exceptions</h2>
<p>Now that the rules for subs/methods etc are settling down, Dan
outlined his thoughts on exception handlers. If I'm understanding him
correctly, an exception handler is just a continuation that you invoke
with the exception as its only argument. There were no comments by the
end of the week.</p>
<p><a href='http://groups.google.com/groups?threadm=a0521060abb1a415c7209@' target='_blank'>groups.google.com</a>[63.120.19.221]</p>
<a name='Meanwhile in perl6-language'></a><h1>Meanwhile in perl6-language</h1>
<p>The language list was quiet again. Maybe everyone was doing face to
face things at YAPC. Or on holiday. Or something.</p>
<a name='printf like formatting in interpolated strings'></a><h2><code>printf</code> like formatting in interpolated strings</h2>
<p>Remember last week I mentioned that Luke Palmer had made a cool
suggestion about <code>printf</code> like formatting in string interpolation?
(He suggested a syntax like
<code>rx/&lt;expression&gt; but formatted(&lt;formatspec&gt;)/</code>, which I for one quite
liked).</p>
<p>Edwin Steiner wasn't so keen, noting that Luke's suggestion was
actually more verbose than
<code>rx/sprintf &lt;formatspec&gt;, &lt;expression&gt;/</code>. He wasn't entirely sure
that having a formatting rule attached to a value with a 'but' was
really the right thing to do (it does rather violate the whole
model/view/controller abstraction for instance). Edwin's favoured
interpolation syntax was,</p>
<pre>  rule formatted_interpolation {\\F &lt;formatspec&gt; &lt;interpolatable_atom&gt;}
  rule formatspec { # sprintf format without '%' 
  }
  rule interpolatable_atom { &lt;variable&gt; | \$\( &lt;expr&gt; \) }</pre>
<p>(or something along those lines). Edwin went on to extend his idea,
allowing for all sorts of clever interpolation rules, leading Dave
Storrs to comment that the Obfuscated Perl people would certainly
thank him if the suggestions went in.</p>
<p>Arcadi Shehter came up with yet another suggested syntax involving
<code>:</code> (neglecting the important rule that, whilst one's heart my belong
to Daddy, the <code>:</code> belongs to Larry. And I'm really trying not to
think about the images that conjures up).</p>
<p>At this point, we ended up in a philosophical discussion about when
was the right time to do stuff, generality of solutions and Perl
remaining Perl. I remain confident that come the appropriate time,
Larry and/or Damian (more likely Damian given some of the stuff he was
showing off to do with formatting at YAPC) will nail things down and
we'll all go &quot;Of course!&quot; and move onto the next thing.</p>
<p><a href='http://groups.google.com/groups?threadm=ygcwufmwx2x.fsf@babylonia.flatirons.org' target='_blank'>groups.google.com</a></p>
<a name='Dispatching, Multimethods and the like'></a><h2>Dispatching, Multimethods and the like</h2>
<p>Adam Turoff noted that, in his YAPC opening talk, Damian had mentioned
the catchall DISPATCH sub, which will allow for altering the dispatch
behaviour to do any magic you choose. The 'problem' with DISPATCH is
defining its interaction with the likes of AUTOLOAD and other built in
dynamic dispatch behaviours, which will need to be nailed down.</p>
<p>Dan Sugalski jetted over from perl6-internals to give the lowdown on
what would be available at the parrot level (which may or may not be
exposed at the Perl 6 language level). Essentially, what we know is
that there will be the capability to insert any dispatch method you
like, but the details of how you'd do it aren't thrashed out yet. It
almost certainly won't be easy, but that's a good thing.</p>
<p><a href='http://groups.google.com/groups?threadm=20030616145807.GA16195@panix.com' target='_blank'>groups.google.com</a></p>
<a name='Type Conversion Matrix, Pragmas (Take 4)'></a><h2>Type Conversion Matrix, Pragmas (Take 4)</h2>
<p>Discussion of Mike Lazzaro's type conversion matrix continued as
people explored corner cases.</p>
<p><a href='http://groups.google.com/groups?threadm=319DBDC4-A01E-11D7-B141-000A277AA894@cognitivity.com' target='_blank'>groups.google.com</a></p>
<a name='Acknowledgements, Announcements and Apologies'></a><h1>Acknowledgements, Announcements and Apologies</h1>
<p>Whee! My first anniversary! I confess that when I started writing
these things I didn't expect to keep going for this long. Now I don't
expect to ever stop.</p>
<p>After due and careful consideration of a short shortlist, I should
like to award an anniversary virtual white parrot award to Leopold
&quot;Patchmonster&quot; T&ouml;tsch for his astonishing contribution to the
Parrot core. Other mental nominees for this award were: Clinton A
Pierce, for BASIC and the associated bug finding; Leon Brocard, for
humorous reasons and Robert Spier and Ask Bj&oslash;rn Johansen for
invaluable and invisible work on websites, CVS and mailing list
maintenance.</p>
<p>I eliminated the core design team from consideration for the above
award, but I'd like to formally thank Larry, Damian, Allison and Dan,
without whom...</p>
<p>As I said last week, Leon Brocard is no longer the summaries' running
joke. However, I auctioned off the right to specify the next running
joke at YAPC last week; next week should see the unveiling of the new,
improved Perl 6 Summary Running Joke.</p>
<p>If you've appreciated this summary, please consider one or more of the
following options:</p>
<ul>
<li><a name='Send money to the Perl Foundation at donate.perl-foundation.org/ and help support the ongoing development of Perl.'></a>Send money to the Perl Foundation at
<a href='http://donate.perl-foundation.org/' target='_blank'>donate.perl-foundation.org</a> and help support the ongoing
development of Perl.</li>
<li><a name='Get involved in the Perl 6 process. The mailing lists are open to all. dev.perl.org/perl6/ and www.parrotcode.org/ are good starting points with links to the appropriate mailing lists.'></a>Get involved in the Perl 6 process. The mailing lists are open  to
all. <a href='http://dev.perl.org/perl6/' target='_blank'>dev.perl.org</a> and <a href='http://www.parrotcode.org/' target='_blank'>www.parrotcode.org</a>
are good starting points with links to the appropriate mailing lists.</li>
<li><a name='Send feedback, flames, money, photographic and writing commissions, or a cute little iPod with a huge capacity to satisfy my technolust p<a href='mailto:6summarizer@bofh.org.uk'>6summarizer@bofh.org.uk</a>.'></a>Send feedback, flames, money, photographic and writing commissions, or
a cute little iPod with a huge capacity to satisfy my technolust
<i><a href='http://search.cpan.org/perldoc?<a href='mailto:p6summarizer@bofh.org.uk'>p6summarizer@bofh.org.uk</a>'>p<a href='mailto:6summarizer@bofh.org.uk'>6summarizer@bofh.org.uk</a></a></i>.</li>
</ul>
</div>
